<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link type="text/css" href="/topjui/css/myui.css" rel="stylesheet"/>
</head>
<body>
<form id="customerform" method="post" style="padding-top:1px">
    <input type="hidden" name="id" id="id">
    <table style="margin:6px; width: 98%">
        <tr style="height: 39px">
            <td class="label" width="126px" style="text-align: right">录入日期</td>
            <td>
                <input type="text" id="form-crtime" name="crtime" autocomplete="off" class="selectp"  style="width:250px;">
            </td>
        </tr>
        <tr style="height: 39px">
            <td class="label" width="126px" style="text-align: right">车辆牌号</td>
            <td>
                <input type="hidden" id="form-carid" name="carid" value="0">
                <input type="text" id="form-plateno"  name="plateno"  readonly="readonly" class="selectp" style="width:250px;">
            </td>
        </tr>
        <tr style="height: 39px">
            <td class="label" width="126px" style="text-align: right">费用类型</td>
            <td>
                <input type="text" id="form-outtype" name="outtype" class="selectp" autocomplete="off" style="width:250px;">
            </td>
        </tr>
        <tr style="height: 39px">
            <td class="label"  width="126px" style="text-align: right">金额</td>
            <td>
                <input type="text" name="cost" class="selectp"  autocomplete="off" style="width:250px;">
            </td>
        </tr>
    </table>
</form>
<script th:inline="javascript">
    $(function () {
        $('#form-crtime').datebox({
            formatter: function (date) {

                var y = date.getFullYear();
                var m = date.getMonth() + 1;
                var d = date.getDate();
                return y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);

            }
        });

        $('#form-outtype').combotree({
            width: 212,
            height: 32,
            style: "width:212px;height:32px;",
            cls: 'selectp',
            panelWidth: 250,
            hasDownArrow: true,
            url: '/sys/groupsText?groups=费用类型',
            required: true,
            onSelect: function (data) {
                $("#form-outtype").val(data.text);
            }
        });

        $(".combo-text").removeAttr("style");
        $(".combo-text").attr("style", "width:250px;height:32px;line-height:24px");
        $(".combo-text").addClass("selectp");
        $(".combo-arrow").attr("style", "margin-left: -20px;margin-top: 4px;background-color:rgba(0,0,0,0)");
        $(".combo-panel").attr("style", "margin-top:10px;");
    });
</script>
</body>
</html>